import { defHttp } from '/@/utils/http/axios';

enum Api {
    queryDayData = '/xl/home/queryDayData',
    queryOrderData = '/xl/home/queryOrderData',
    storeRanking = '/xl/home/storeRanking',
    productRanking = '/xl/home/productRanking',
    aftersaleData = '/xl/home/aftersaleData',
}


/**
 * 首页-今日订单数据
 * @param params
 */
export const queryDayData = () => defHttp.get({ url: Api.queryDayData });

/**
 * 订单统计数据
 * @param params
 */
export const queryOrderData = (params) => defHttp.get({ url: Api.queryOrderData, params }, { isTransformResponse: false });

/**
 * 门店销售榜单
 * @param params
 */
export const getStoreRanking = (params) => defHttp.get({ url: Api.storeRanking, params }, { isTransformResponse: false });
/**
* 热销商品
* @param params
*/
export const getProductRanking = (params) => defHttp.get({ url: Api.productRanking, params }, { isTransformResponse: false });
/**
 * 售后分析
 * @param params
 */
export const getAftersaleData = (params) => defHttp.get({ url: Api.aftersaleData, params }, { isTransformResponse: false });